Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.4K
Visualizações
Apache: how to call "static int lua_handler(request_rec *r)" function from the proxy

Hello everybody,

I m trying to call the Apache lua module from "mod_proxy_wstunnel.c" in order to exploit the mod_lua functions.

Herein my code [mod_proxy_wstunnel.c]:

...
#include "#include "../../mod_lua.h"
...
...
static void ap_proxy_http_register_hook(apr_pool_t *p)
{   
    proxy_hook_scheme_handler(proxy_wstunnel_handler, NULL, NULL, APR_HOOK_FIRST);
    proxy_hook_canon_handler(proxy_wstunnel_canon, NULL, NULL, APR_HOOK_FIRST);
    ap_hook_handler(lua_handler, NULL, NULL, APR_HOOK_MIDDLE); // added line
}

I added the ap_hook_handler(lua_handler, NULL, NULL, APR_HOOK_MIDDLE); line in order to call the mod_lua handler.

  • static int lua_handler(request_rec *r) function is located in httpd-2.4.43/modules/lua/mod_lua.c
  • static void ap_proxy_http_register_hook(apr_pool_t *p) is located in httpd-2.4.43/modules/proxy/mod_proxy_wstunnel.c

When I compile, I get this error: mod_proxy_wstunnel.c:19:10: fatal error: ../../mod_lua.h: No such file or directory 19 | #include "../../mod_lua.h"

Any help or idea is welcome. Thank you at advance.

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda